<?php

FLEA::loadClass('Controller_BaseController');

class Controller_Terminal extends Controller_BaseController
{
	
    function Controller_Terminal() {
        
		$this->table = & FLEA::getSingleton('Table_Terminals');
		
    }
   
   function actionBoList(){
	   FLEA::loadClass('FLEA_Ajax');
	   $dispatcher =& $this->_getDispatcher();
        $user = $dispatcher->getUser();
		if(isset($user['terminal_id'])&&null!=$user['terminal_id'])
		    $this->conditions='terminal_id='.$user['terminal_id'];
		  
		$arr=$this->table->findAll($this->conditions,null,null,'terminal_id , name');

		echo '{Result:'.json_encode($arr).'}';
   }

}    
?>